package space.edge.d.demo.qrcode.codescanner.utils;

import android.content.Context;
import android.content.pm.PackageManager;
import android.icu.text.StringSearch;
import android.support.v4.app.ActivityCompat;

/**
 * Created by gsl on 2017/11/13.
 */

public class PermissionChecker {

    public static boolean checkPermission(Context context, String... permissions) {
        for (String permission : permissions) {
            if (ActivityCompat.checkSelfPermission(context.getApplicationContext(), permission) == PackageManager.PERMISSION_DENIED)
                return false;
        }
        return true;
    }
}
